#include <stdio.h>
#include <stdarg.h>
double avg(int nu,...)
{
    va_list valist;
    int i;
    double sum = 0.0;
    va_start(valist,nu);
    for(i = 0;i < nu;i++)
    {
        sum += va_arg(valist,int);
    }
    va_end(valist);
    return sum/nu;
}
int main()
{
    printf("average of (5,2,3,4,5,6) is: %f\n",avg(5,2,3,4,5,6));
    return 0;
}
